<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>amCharts examples</title> 
        <script src="../../amcharts/javascript/amcharts.js" type="text/javascript"></script>
        <script src="../../amcharts/javascript/raphael.js" type="text/javascript"></script>        
	    
        <script type="text/javascript">

        var chart;

        var chartData = [
					{country:"Czech Republic",litres:156.90,short:"CZ"},
					{country:"Ireland",litres:131.10,short:"IR"},
					{country:"Germany",litres:115.80,short:"DE"},
					{country:"Australia",litres:109.90,short:"AU"},
					{country:"Austria",litres:108.30,short:"AT"},
					{country:"UK",litres:99.00,short:"UK"},
					{country:"Belgium",litres:93.00,short:"BE"}];

         window.onload = function() {
            // Bar chart
            var chart1 = new AmCharts.AmSerialChart();
            chart1.dataProvider = chartData;
            chart1.categoryField = "country";
			chart1.rotate = true;
			chart1.color = "#FFFFFF";
			chart1.marginTop = 100;
			chart1.marginLeft = 50;
			chart1.marginRight = 30;
            chart1.startDuration = 2;
            chart1.backgroundImage = "images/bg.jpg";

			var catAxis1 = chart1.categoryAxis;
			catAxis1.gridAlpha = 0;
			catAxis1.axisAlpha = 0;
			catAxis1.labelsEnabled = false;

			var valAxis1 = new AmCharts.ValueAxis();
			valAxis1.gridAlpha = 0;
			valAxis1.axisAlpha = 0;
			valAxis1.labelsEnabled = false;
			valAxis1.minimum = 0;
			chart1.addValueAxis(valAxis1);

			var graph1 = new AmCharts.AmGraph();
			graph1.balloonText = "[[category]]: [[value]]";
			graph1.valueField = "litres"
			graph1.type="column";
			graph1.lineAlpha = 0;
			graph1.fillAlphas = 0.5;
			graph1.fillColors = ["#000000","#FF6600"];
			graph1.gradientOrientation = "horizontal";
			graph1.labelPosition="bottom";
			graph1.labelText="[[category]]: [[value]] Litres";
			graph1.balloonText="[[category]]: [[value]] Litres";
			chart1.addGraph(graph1);

			chart1.addLabel(50, 40, "Bear Consumption by country", "left", 15, "#000000", 0, 1, true);
			chart1.write("chartdiv1");


            // Column chart
            var chart2 = new AmCharts.AmSerialChart();
            chart2.dataProvider = chartData;
            chart2.categoryField = "country";
			chart2.marginTop = 32;
			chart2.marginLeft = 15;
			chart2.marginRight = 15;
			chart2.startDuration = 2;
			chart2.backgroundColor = ["#FFFFFF", "#DADADA"];
			chart2.backgroundAlpha = 0.5;

			chart2.balloon.textShadowColor = "#000000";

			var catAxis2 = chart2.categoryAxis;
			catAxis2.gridAlpha = 0;
			catAxis2.axisAlpha = 0;
			catAxis2.labelsEnabled = false;

			var valAxis2 = new AmCharts.ValueAxis();
			valAxis2.gridAlpha = 0;
			valAxis2.axisAlpha = 0;
			valAxis2.labelsEnabled = false;
			valAxis2.minimum = 0;
			chart2.addValueAxis(valAxis2);

			var graph2 = new AmCharts.AmGraph();
			graph2.balloonText = "[[category]]: [[value]]";
			graph2.valueField = "litres";
			graph2.descriptionField = "short";
			graph2.type="column";
			graph2.lineAlpha = 0;
			graph2.fillAlphas = 1;
			graph2.fillColors = ["#DADADA","#000000"];
			graph2.labelPosition="bottom";
			graph2.labelText="[[description]]";
			graph2.balloonText="[[category]]: [[value]] Litres";
			chart2.addGraph(graph2);

			chart2.write("chartdiv2");

		}

	    </script>

    </head>

	<body>
		<div id="chartdiv1" style="width: 520px; float:left; height: 400px;"></div>
		<div id="chartdiv2" style="width: 520px; float:left; height: 400px;"></div>
	</body>
</html>

